Skip to content

refactor(test): add scenario for overrideScrollViewContentInsetAdjustmentBehavior (iOS)#3957

Open
LKuchno wants to merge 8 commits intomainfrom
@lkuchno/test-tab-screen-options-ios
Open

refactor(test): add scenario for overrideScrollViewContentInsetAdjustmentBehavior (iOS)#3957
LKuchno wants to merge 8 commits intomainfrom
@lkuchno/test-tab-screen-options-ios

Conversation

@LKuchno
Copy link
Copy Markdown
Collaborator

@LKuchno LKuchno commented Apr 30, 2026

Description

This PR adds a manual test scenario for the overrideScrollViewContentInsetAdjustmentBehavior prop on TabsScreen (iOS). The scenario screen was already present in the codebase but lacked testID and tabBarItemTestID / tabBarItemAccessibilityLabel attributes needed to make it addressable by automated tests, and had no accompanying scenario.md document.
The screen has been refactored into its own directory (test-tabs-override-scroll-view-content-inset-ios/) to follow the convention used by other tab test scenarios, and the scenario key has been updated to match the new directory name. The scenario.md covers three distinct cases - false, true, and the default (prop omitted).
No automated e2e test is included in this PR; the scenario is marked as ongoing research.

Closes: https://github.com/software-mansion/react-native-screens-labs/issues/1210

Changes

  • Test/Tabs: Renamed and moved override-scroll-view-content-inset.tsx into a new test-tabs-override-scroll-view-content-inset-ios/ directory with an index.tsx entry point, aligning with the naming convention of sibling test scenarios
  • Test/Tabs: Updated the scenario key from override-scroll-view-content-inset to test-tabs-override-scroll-view-content-inset-ios to match the new directory name
  • Test/Tabs: Added testID props to each ScrollView (override-inset-false-scrollview, override-inset-true-scrollview, override-inset-default-scrollview) and tabBarItemTestID / tabBarItemAccessibilityLabel to each tab entry to make them individually addressable by future automated tests
  • Test/Tabs: Added scenario.md with a full step-by-step manual verification guide covering all three overrideScrollViewContentInsetAdjustmentBehavior states and a cross-tab comparison section
  • Test/index: Updated the tabs scenario index to import from the new module path and export under the new scenario name TestTabsOverrideScrollViewContentInset

Scenario video

Note: scenario was updated - now we first scroll down and in next step scroll to top.

Screen.Recording.2026-04-30.at.10.38.31.mov

@LKuchno LKuchno requested a review from Copilot April 30, 2026 08:30
@LKuchno LKuchno added platform:ios Issue related to iOS part of the library area:tabs Issue related to bottom tabs labels Apr 30, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an iOS-only manual test scenario for TabsScreen’s overrideScrollViewContentInsetAdjustmentBehavior, making the scenario addressable by future automation via stable identifiers and documenting expected behavior.

Changes:

  • Added a new scenario.md with step-by-step manual verification for false, true, and default (prop omitted).
  • Refactored the scenario into its own directory with a new scenario key matching the directory name.
  • Added testID props for the per-tab ScrollView content and tab bar item identifiers for automation targeting.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
apps/src/tests/single-feature-tests/tabs/test-tabs-override-scroll-view-content-inset-ios/scenario.md New manual verification guide for the scenario.
apps/src/tests/single-feature-tests/tabs/test-tabs-override-scroll-view-content-inset-ios/index.tsx Scenario implementation refactor; adds testIDs and updates scenario key.
apps/src/tests/single-feature-tests/tabs/index.ts Updates tabs scenario registry to import/export the scenario from its new location/name.
Comments suppressed due to low confidence (2)

apps/src/tests/single-feature-tests/tabs/test-tabs-override-scroll-view-content-inset-ios/index.tsx:96

  • App wraps TabsContainer in a nested NavigationIndependentTree/NavigationContainer. In the single-feature tests harness, scenarios are already hosted under a navigation container (ScenarioScreen), and other tab scenarios use TabsContainer without this extra wrapper. Unless TabsContainer specifically requires its own independent navigation tree here, consider removing the nested navigation container to keep the scenario environment consistent and avoid double-navigation complexity.
    apps/src/tests/single-feature-tests/tabs/test-tabs-override-scroll-view-content-inset-ios/index.tsx:84
  • tabBarItemAccessibilityLabel is being used as an ID-like string and tabBarItemTestID is missing for the False tab. This makes automated targeting inconsistent across tabs and also overrides the accessibility label with a non-human-friendly value. Prefer setting tabBarItemTestID for the False tab as well, and either omit tabBarItemAccessibilityLabel (let it default to title) or set it to a human-readable label for all tabs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

**Default** — each exhibit the expected inset behavior and that the
**Default** tab (prop omitted) matches the **True** tab.

**OS test creation version:** iOS 18.6 and 26.2
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The OS version line is ambiguous: iOS 18.6 and 26.2 reads like two different OSes, but only the first number is prefixed with iOS. For consistency with other scenario docs (e.g. iOS: 18.6 and 26.2), consider adding the iOS: prefix/formatting so it’s clear both versions are iOS versions.

Suggested change
**OS test creation version:** iOS 18.6 and 26.2
**OS test creation version:** iOS: 18.6 and 26.2

Copilot uses AI. Check for mistakes.
@LKuchno LKuchno requested a review from t0maboro April 30, 2026 08:37
@LKuchno LKuchno added the type:chore A general maintenance task, that does not fall into other categories. label Apr 30, 2026
@LKuchno LKuchno changed the title chore(test): add scenario for overrideScrollViewContentInsetAdjustmentBehavior (iOS) refactor(test): add scenario for overrideScrollViewContentInsetAdjustmentBehavior (iOS) Apr 30, 2026
@LKuchno LKuchno removed the type:chore A general maintenance task, that does not fall into other categories. label Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tabs Issue related to bottom tabs platform:ios Issue related to iOS part of the library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants